﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Public.ascx.cs" Inherits="NCS.Module.CongTy.Admin.UserControls.Public" %>

<script runat="server">

    protected void grid_Sorting(object sender, GridViewSortEventArgs e)
    {
        
    }

    protected void grid_RowEditing(object sender, GridViewEditEventArgs e)
    {
        
    }
</script>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            Lọc theo:
            <asp:DropDownList ID="ddlFilter" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlFilter_SelectedIndexChanged"
                Width="188px">
            </asp:DropDownList></td>
    </tr>
    <tr>
        <td>
            <asp:GridView ID="grid" runat="server" AllowPaging="True" AutoGenerateColumns="False" OnRowDataBound="grid_RowDataBound" OnRowEditing="grid_RowEditing"
                OnPageIndexChanging="grid_OnPageIndexChanging" Width="100%" OnRowCommand="grid_RowCommand" OnSorting="grid_Sorting"
                CellPadding="4" ForeColor="#333333" GridLines="None">
                <AlternatingRowStyle CssClass="Grid_Raw2" BackColor="White" ForeColor="#284775" />
                <RowStyle CssClass="Grid_Raw1" BackColor="#F7F6F3" ForeColor="#333333" />
                <HeaderStyle Font-Bold="True" CssClass="Grid_Top" BackColor="#5D7B9D" ForeColor="White">
                </HeaderStyle>
                <Columns>
                    <asp:BoundField DataField="CongTyID" HeaderText="ID">
                        <HeaderStyle Width="30px" />
                        <ItemStyle Width="30px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Stt">
                        <HeaderStyle Width="30px" />
                        <ItemStyle Width="30px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TieuDe" HeaderStyle-Width="50%" HeaderText="Tiêu đề" />
                    <asp:TemplateField HeaderText="Trạng thái">
                        <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderTemplate>
                        <asp:Literal ID="Literal1" Text="Trạng thái" runat="server"></asp:Literal>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Literal ID="ltrTrangThai" runat="server" Text='<%# Eval("TrangThai") %>'></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Thao tác">
                        <HeaderStyle Width="10%" />
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        <ItemTemplate>
                            <asp:Button ID="btnPublic" runat="server" CommandArgument='<%# Eval("CongTyID") %>'
                                CommandName="public" CssClass="Button" Text="Xuất bản" Width="60px" />&nbsp;
                            <asp:Button ID="btnUnPublic" runat="server" CommandArgument='<%# Eval("CongTyID") %>'
                                CommandName="unpublic" CssClass="Button" Text="Gỡ xuống" Width="60px" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            </asp:GridView>
        </td>
    </tr>
</table>
